#-*- codeing = utf-8 -*-
#@Time:2022/9/169:31
#@Author :计科1813-14-张玉婷
#@File:5.1.0.py
#@Software:PyCharm

import requests
def get_html_text(url):
    r = requests.get(url)
    if r.status_code == 200:
        r.encoding = 'UTF-8'
        return r.text
    else:
        print("请求失败")
url = 'https://www.baidu.com'
data = get_html_text(url)
print(data)
